﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Miris.HumanMilkAnalyser.WPF.Shared;
using Miris.HumanMilkAnalyser.Service.Shared;

namespace Miris.HumanMilkAnalyser.WPF.CustomizedUserControl
{
    /// <summary>
    /// Interaction logic for DatePickerUserControl.xaml
    /// </summary>
    public partial class DatePickerUserControl : UserControlBase
    {
        public readonly static DependencyProperty SelectedDateProperty = DependencyProperty.Register(
            "SelectedDate", typeof(DateTime), typeof(DatePickerUserControl),
            new FrameworkPropertyMetadata(GeneralUtility.GetCurrentDateTime(), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));

        public DatePickerUserControl()
        {
            InitializeComponent();
        }

        public DateTime SelectedDate
        {
            get
            {
                return (DateTime)GetValue(SelectedDateProperty);
            }
            set
            {
                SetValue(SelectedDateProperty, value);
            }
        }
    }
}
